const app = getApp()
Page({
  data:{
    newsItem:[{
      NewsTitle:'这是一个新闻的标题',
      },
      {
        NewsTitle: '这是两个新闻的标题',
      }, 
      {
        NewsTitle: '这是三个新闻的标题这是三个新闻的标题这是三个新闻的标题',
      }
  ]
  },
  
  goPage: function (e) {
    var id = e.currentTarget.id;
    console.log(e.currentTarget)
    
    wx.navigateTo({
      url: '../news/newsPage/newsPage'+'?id='+id,
    })

  },
  onLoad:function(){
    var _this = this;
    wx.request({
      url: 'http://39.105.78.175/youanmi/wuye/news',
      method: 'GET',
      header: {
        'content-type': 'application/x-www-form-urlencoded',
        'proid': 1
      },
      success(res) {
        console.log(res);
        // _this.imgUrls=res.data.data;
        _this.setData({
          newsItem: res.data.data,
        })
        console.log(res.data.data);
      }
    })
  }
})